package org.tgcloud.group.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;

/**
    * 登录日志
    */
@ApiModel(value="org-tgcloud-group-entity-LogInfo")
@Data
public class LogInfo {
    @ApiModelProperty(value="")
    private Integer id;

    @ApiModelProperty(value="")
    private Integer userId;

    @ApiModelProperty(value="")
    private String token;

    /**
    * 1：登录中，2：已退出
    */
    @ApiModelProperty(value="1：登录中，2：已退出")
    private Short status;

    @ApiModelProperty(value="")
    private Date createTime;

    @ApiModelProperty(value="")
    private Date updateTime;

    @ApiModelProperty(value="")
    private String socketId;

    @ApiModelProperty(value="")
    private String deviceId;

    @ApiModelProperty(value="")
    private Short deviceType;

    @ApiModelProperty(value="")
    private Short userType;

    public LogInfo(Integer userId, String token, String device_id, Short device_type, short user_type) {
        this.token = token;
        this.userId = userId;
        this.deviceId = device_id;
        this.deviceType = device_type;
        this.status = (short) 1;
        this.userType = user_type;
        this.createTime = new Date();
        this.updateTime = new Date();
    }

    public LogInfo(){}
}
